{% extends 'AdminSystemBundle::base.html.twig' %}

{% block content %}
	<div class="breadcrumbs" id="breadcrumbs">
		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="{{ path('admin_system_index') }}">Início</a>

				<span class="divider">
					<i class="icon-angle-right arrow-icon"></i>
				</span>
			</li>
			<li class="active">Usuários</li>
		</ul><!--.breadcrumb-->						
	</div>
	<div class="page-content">
		<div class="row-fluid">
			<div class="span12">
			    <div class="page-header position-relative">
					<h1>
						Lista de Usuários						
					</h1>
				</div><!--/.page-header-->
			
			    <table class="table table-stripped table-bordered">
			        <thead>
			            <tr>
			                <th>Id</th>
			                <th>Login</th>			                
			                <th>E-mail</th>
			                <th>Nome</th>
			                <th>Ativo</th>			                
			                <th>Ação</th>
			            </tr>
			        </thead>
			        <tbody>
			        {% for entity in entities %}
			            <tr>
			                <td><a href="{{ path('admin_system_user_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
			                <td>{{ entity.username }}</td>			                
			                <td>{{ entity.email }}</td>
			                <td>{{ entity.nome }}</td>
			                <td>{% if entity.isActive %}Sim{% else %}Não{% endif %}</td>			                
			                <td>
			               		<a data-rel="tooltip" data-original-title="Alterar Usuário" class='btn btn-mini btn-info' href="{{ path('admin_system_user_edit', { 'id': entity.id }) }}"><i class='icon-only icon-edit bigger-150'></i></a>
			                    <a data-rel="tooltip" data-original-title="Excluir Usuário" class='btn btn-mini btn-info' href="{{ path('admin_system_user_delete_confirm', { 'id': entity.id }) }}"><i class='icon-only icon-trash bigger-150'></i></a>
			                </td>
			            </tr>
			        {% endfor %}
			        </tbody>
			    </table>
				
			    <a class='btn btn-info' href='{{ path('admin_system_user_new') }}' >Novo Usuário</a>			        
			</div>
		</div>
	</div>
{% endblock %}
